package com.ruoyi.purchase.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.purchase.mapper.CommodityManagementMapper;
import com.ruoyi.purchase.domain.CommodityManagement;
import com.ruoyi.purchase.service.ICommodityManagementService;

/**
 * 供应商管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-07-16
 */
@Service
public class CommodityManagementServiceImpl implements ICommodityManagementService 
{
    @Autowired
    private CommodityManagementMapper commodityManagementMapper;

    /**
     * 查询供应商管理
     * 
     * @param id 供应商管理主键
     * @return 供应商管理
     */
    @Override
    public CommodityManagement selectCommodityManagementById(Long id)
    {
        return commodityManagementMapper.selectCommodityManagementById(id);
    }

    /**
     * 查询供应商管理列表
     * 
     * @param commodityManagement 供应商管理
     * @return 供应商管理
     */
    @Override
    public List<CommodityManagement> selectCommodityManagementList(CommodityManagement commodityManagement)
    {
        return commodityManagementMapper.selectCommodityManagementList(commodityManagement);
    }

    /**
     * 新增供应商管理
     * 
     * @param commodityManagement 供应商管理
     * @return 结果
     */
    @Override
    public int insertCommodityManagement(CommodityManagement commodityManagement)
    {
        return commodityManagementMapper.insertCommodityManagement(commodityManagement);
    }

    /**
     * 修改供应商管理
     * 
     * @param commodityManagement 供应商管理
     * @return 结果
     */
    @Override
    public int updateCommodityManagement(CommodityManagement commodityManagement)
    {
        return commodityManagementMapper.updateCommodityManagement(commodityManagement);
    }

    /**
     * 批量删除供应商管理
     * 
     * @param ids 需要删除的供应商管理主键
     * @return 结果
     */
    @Override
    public int deleteCommodityManagementByIds(Long[] ids)
    {
        return commodityManagementMapper.deleteCommodityManagementByIds(ids);
    }

    /**
     * 删除供应商管理信息
     * 
     * @param id 供应商管理主键
     * @return 结果
     */
    @Override
    public int deleteCommodityManagementById(Long id)
    {
        return commodityManagementMapper.deleteCommodityManagementById(id);
    }
}
